# Contributor: Nathan Caldwell <saintdev@gmail.com>
# Maintainer: Nathan Caldwell <saintdev@gmail.com>
# NOTE: For now we must use vendored libfuse, see the URL below for details.
#       https://github.com/trapexit/mergerfs/blob/2.27.0/README.md#why-was-libfuse-embedded-into-mergerfs
pkgname=mergerfs
pkgver=2.38.1
pkgrel=0
pkgdesc="A FUSE based union filesystem"
url="https://github.com/trapexit/mergerfs"
arch="all"
license="ISC"
depends="libattr"
makedepends="autoconf automake libtool gettext-dev attr-dev linux-headers"
options="suid !check" # No test suite
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/trapexit/mergerfs/archive/$pkgver.tar.gz"

prepare() {
	default_prepare
	echo "$pkgver" > "$builddir"/VERSION
}

build() {
	export GIT_CEILING_DIRECTORIES="$srcdir"
	make OPTS="$CXXFLAGS"
}

package() {
	make PREFIX="/usr" DESTDIR="$pkgdir" install
}

sha512sums="
f485df32bb0749898ea18e8f97996c74cb1fd998108baa3fc207e6c4f6d68f3a0905fd0cbb113e9aefa6444bf98ffe207de53d57579e393da259d9a79d2cc160  mergerfs-2.38.1.tar.gz
"
